/*
 * Copyright (c) 2010 CCX(China) Co.,Ltd. All Rights Reserved.
 *
 * This software is the confidential and proprietary information of
 * CCX(China) Co.,Ltd. ("Confidential Information").
 * It may not be copied or reproduced in any manner without the express 
 * written permission of CCX(China) Co.,Ltd.
 *
 * Author: zhaosj
 * Date: 2010-7-7 上午09:49:33
 */
package com.db;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;

import com.util.ConnUtil;

/**
 * @author Administrator
 * 
 */
public class DbServer {

	public static void testSqlserver() {

		try {
			Connection con = ConnUtil.getConnection("testSQLServer");
			Statement st = con.createStatement();

			ResultSet rs = st.executeQuery("select top (10) * from gpsj_2010030160s");

			while (rs.next())
			{
				System.out.println(rs.getString("StockCode"));
//				System.out.println(rs.getString(""));
			}
			
			rs.close() ;
			st.close() ;
			con.close() ;

		} catch (Exception e) {

			e.printStackTrace();
		}
	}
	
	public static void main(String[] args) {
		
		testSqlserver() ;
		
	}

}
